package com.karaoke.android.kege.fragment


import android.os.Bundle
import android.support.v4.app.Fragment
import android.transition.Explode
import android.transition.Transition
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.karaoke.android.kege.databinding.FragmentKeywordBoardBinding
import com.karaoke.android.kege.vm.SearchViewModel
import universum.studios.android.fragment.BaseFragment
import kotlin.properties.Delegates


/**
 * A simple [Fragment] subclass.
 */
class KeywordBoardFragment : BaseFragment() {
    companion object {
        fun newInstance(model: SearchViewModel) = KeywordBoardFragment().apply {
            this.model = model
        }
    }

    override fun getEnterTransition(): Transition = Explode().apply { duration = 200 }
    private var mBinding: FragmentKeywordBoardBinding? = null

    private var model: SearchViewModel? = null

    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        if (mBinding == null) {
            mBinding = FragmentKeywordBoardBinding.inflate(inflater, container, false)
            mBinding?.viewModel = model
        }
        return mBinding?.root
    }
}// Required empty public constructor
